#!/usr/bin/env python
import os,sys

def change_to_program_dir():
    os.chdir(os.path.abspath(os.path.dirname(sys.argv[0])))

def win_quote1(str):
    "Quote command line in \" .... \" if there is spaces in string"
    if " " in str:
        str = '"' + str + '"'
    return str

def win_quote2(str):
    "Quote command line in \" .... \" if there is spaces in string"
    if " " in str:
        str = '"' + str + '"'
    return str
